

import 'package:tplib/base/base_service.dart';
import 'package:tplib/net/baseentity.dart';
import 'package:tplib_example/model/comm_entity_factory.dart';
import 'package:tplib_example/model/user_entity.dart';
import 'package:tplib_example/service/net/comm_net_utils.dart';


/**
 * GetOne 网络层
 */
class ModuleCommService with BaseService{

  int getCount(int count){
    return count=count+1;
  }

  getData() async{

    //https://www.chinawylm.com/api.php/article/articlelist
    BaseEntity requestGetData = await CommNetUtils.instance.postData<UserEntity,CommEntityFactory>(CommEntityFactory.instance,'/article/articlelist' );
    UserEntity userEntity=requestGetData.data;
    print('requestGetData-->${requestGetData.toString()}');
    return requestGetData;
  }

  getListData<T>(){
    List<T> list=[];

  }
  getDataTwo() async{
    BaseEntity requestGetData =await CommNetUtils.instance.postData<String,CommEntityFactory>(CommEntityFactory(),
        '/it/u=2605112544,759365927&fm=15&fmt=auto&gp=0.jpg',
      baseUrl: 'https://img2.baidu.com/'
    );
    return requestGetData;
  }
}